package com.xy.biz.fd.domain.bo;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

/**
 *
 *
 * @author zgy
 * @date 2021-6-15
 */
@NoArgsConstructor
@AllArgsConstructor
@Builder
@Data
public class DocumentReleaseOftenUseBO {

    /**
     * 常用Id
     */
    private Long oftenUseId;
    /**
     * 文件发行签收Id
     */
    private Long documentReleaseId;
    /**
     * 使用者用户Id
     */
    private Long useUserId;
    /**
     * 排序号
     */
    private Integer sequence;
    /**
     * 租户Id，0表示不指定
     */
    private Long tenantId;
    /**
     * 创建时间
     */
    private LocalDateTime createTime;
    /**
     * 更新时间
     */
    private LocalDateTime updateTime;
    /**
     * 删除标识：0-正常，1-删除
     */
    private Boolean deleteFlag;

    public void increment() {
        if (sequence == null) {
            sequence = 0;
        }
        sequence = sequence + 1;
    }
}
